i = 1
while i <= 5:
    j = 1
    while j <= 5:
        print('*', end='  ')
        j += 1
    print()
    i += 1

# 九九乘法表
i = 1
while i <= 9:
    j = 1
    while j <= i:
        print(f'{j} * {i} = {j * i}\t',end='')
        j += 1
    print()
    i += 1

i = 9
while i > 0:
    j = 1
    while j <= i:
        print(f'{j} * {i} = {j * i}',end='\t')
        j += 1
    print()
    i -= 1
